﻿using Nacos.V2;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace NacosApp.NacosConf
{
    public class StarpNacos
    {
        private INacosConfigService svc;
        public StarpNacos(INacosConfigService service)
        {
            svc = service;
        }
        public async Task StartAsync()
        {
            DemoConfigListener listener = new DemoConfigListener();
            await BaseNacosConfig.PublishConfig(svc);
            await BaseNacosConfig.GetConfig(svc);
            await BaseNacosConfig.RemoveConfig(svc);
            await BaseNacosConfig.ListenConfig(svc, listener);
        }
    }
}
